FROM ubuntu:22.04
LABEL maintainer="yuankun"
ENV TZ=Asia/Shanghai
RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list && \
    sed -i "s@http://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list && \
    apt-get update && apt-get install -y python3 curl net-tools wget iputils-ping traceroute iproute2 tzdata && \ 
    rm -rf /etc/localtime && \
    ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && \
    echo $TZ > /etc/timezone && \
    rm -rf /var/lib/apt/lists/*

COPY app_python.py /
EXPOSE 80 8080
ENTRYPOINT [ "python3","/app_python.py" ]